{extend name="base" /}{block name="seo"}
<title>我的收藏 - {$site.name}</title>
<meta name="keywords" content="{$site.keywords}">
<meta name="description" content="{$site.description}">
{/block}
{block name="css"}
<link href="__HOME__/css/user.css" rel="stylesheet" type="text/css">
<style>
    .intr .layui-clear{
        line-height: 30px;
    }
</style>
{/block}
{block name="body"}
<div class="container">
    <div class="user">
        {include file="index/menu"}


        <div class="user-stow user-box fl">
                <div class="title">
                    投稿记录
                    <span>您总共投稿了 <b id="count">0</b> 次。</span>
                </div>
                <div class="list">
                    <ul id="page_body_id" style="min-height: 480px">
                    </ul>
                    <p id="page_id" style="text-align: center"></p>
                 </div>



    </div>
</div>

{/block}
{block name="script"}
    <script id="page_template_id" type= "text/html">
        {{# layui.each(d.list, function(index, item){ }}
        <li>
            <time>{{item.create_time}}</time>
            {{#if(item.check_status==0){ }} 待审核 {{# }else if(item.check_status==2){ }} 审核不通过 {{# }else{ }} 审核通过{{# } }}

            {{#if(item.status==1){ }}
            <a href="{{item.url}}" class="tit" target="_blank">
                {{item.title}}</a>

            {{# }else{ }}  {{item.title}}{{# } }}

            <a href="javascript:;" data-info='{{item.info}}' class="link showDetail">查看 &gt;</a>

<!--            <span><a href="javascript:;" class="favorite-del del" data-title="{{item.subject_title}}" data-id="{{item.id}}">移除-->
<!--							</a></span>-->
        </li>
        {{# }); }}
    </script>
    <script id="introduce" type="text/html">
        <div class="intr">
            <div class="layui-clear">
                <div class="left"> 投稿标题：</div>
                <div class="right"> {{d.title}}</div>
            </div>

            <div class="layui-clear">
                <div class="left"> 投稿状态：</div>
                <div class="right"> {{#if(d.status==1){}} 已通过 {{#}else if(d.status==2){}} 不通过 {{#}else{}} 待审核 {{#}}}</div>
            </div>
            <div class="layui-clear">
                <div class="left"> 投稿时间：</div>
                <div class="right"> {{d.create_time}}</div>
            </div>
            <div class="layui-clear">
                <div class="left"> 审核时间：</div>
                <div class="right"> {{#if(d.publish_time){}} {{d.publish_time}} {{#}else{}}--{{#}}}</div>
            </div>
            {{#if(d.check_result){}}
            <div class="layui-clear">
                <div class="left"> 审核拒绝原因：</div>
                <div class="right"> {{d.check_result}}</div>
            </div>
            {{#}}}
            {{#if(d.reward_account){}}

            <div class="layui-clear">
                <div class="left"> 申请奖励的支付宝账号：</div>
                <div class="right"> {{d.reward_account}}</div>
            </div>
            <div class="layui-clear">
                <div class="left"> 支付宝姓名：</div>
                <div class="right"> {{d.reward_name}}</div>
            </div>

            {{#}}}
            {{#if(d.reward_status == 1){}}
            <div class="layui-clear">
                <div class="left"> 奖励金额：</div>
                <div class="right"> {{d.reward_amount}}</div>
            </div>
            {{#}}}
            {{#if(d.reward_result){}}
            <div class="layui-clear">
                <div class="left"> 奖励发放结果：</div>
                <div class="right"> {{d.reward_result}}</div>
            </div>

            {{#}}}
        </div>
    </script>
<script>

    layui.use(['laytpl', 'flow', 'layer'], function () {
        $(".list").on("click", ".showDetail", function () {
            //弹出投稿详情
            var laytpl = layui.laytpl;
            var result = $(this).data("info");

            if (result) {

                laytpl($("#introduce").html()).render(result, function (html) {

                    layer.open({
                        type: 0,
                        shadeClose: true,
                        skin: 'atuikeLayerSkin1 trlayer',
                        content: html,
                        btn: ['我知道了'],
                        area: ['350px', '430px']
                    });
                });
            }


        });

    });
        renderPageData( '/api/user/contributeLog',"page_id", "page_template_id" ,
            "#page_body_id" ,'count',{});


</script>
{/block}
